package com.witfortos.common.utils;


import android.annotation.SuppressLint
import android.widget.Toast;

import com.witfortos.common.base.App;


class ToastUtils {

    companion object {
        var mToast: Toast? = null;
        fun showToast(text: String) {
            getSingletonToast(text).show();
        }

        @SuppressLint("ShowToast")
        fun getSingletonToast(text: String): Toast {
            if (mToast == null) {
                mToast = Toast.makeText(App.mContext, text, Toast.LENGTH_SHORT);
            } else {
                mToast!!.setText(text);
            }
            return mToast!!;
        }
    }


}